<?php
namespace app\admin\controller;

use think\Controller;
use think\Db;
use think\Request;

class User extends Controller
{
    public function index(Request $request)
    {
        $page = $request->get('page',1);
        $pageSize = $request->get("page_size",10);
        $offset = ($page-1)*$pageSize;
        $user = Db::table("user")->limit($offset,$pageSize)->select();
        $total = Db::table("user")->count();
        $this->success("获取列表成功",'',['list'=>$user,'total'=>$total]);
    }
}
